package com.hxkj.dao.impl;

import com.hxkj.dao.AuthAppDao;
import com.hxkj.mapper.AuthAppMapper;
import com.hxkj.domain.po.AuthApp;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: chenwei
* @version: 1.0
* @datetime: 2018-05-21 17:59:26
*
*/
@Service("authAppDao")
public class AuthAppDaoImpl implements AuthAppDao {

    @Resource
    private AuthAppMapper authAppMapper;

    @Override
    public AuthApp get(Long appId) {
        return authAppMapper.selectByPrimaryKey(appId);
    }

    @Override
    public List<AuthApp> get(AuthApp authApp) {
        return authAppMapper.select(authApp);
    }

    @Override
    public int delete(Long appId) {
        return authAppMapper.deleteByPrimaryKey(appId);
    }

    @Override
    public int delete(AuthApp authApp) {
        return authAppMapper.delete(authApp);
    }

    @Override
    public int save(AuthApp authApp) {
        return authAppMapper.insert(authApp);
    }

    @Override
    public int update(AuthApp authApp) {
        return authAppMapper.update(authApp);
    }
}
